<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="Rover.RoverDeal"%>
<%@page import="java.util.*" %>
<%

//需要先实例化对象
RoverDeal Rover=new RoverDeal();
Rover.setRovID(Rover.CalRovID());
Rover.setAdmID(request.getParameter("AdmID"));
Rover.setComMax(Integer.parseInt(request.getParameter("ComMax")));
Rover.setRovName(request.getParameter("RovName"));
out.print("<script>alert('"+Rover.CalRovID()+"')</script>");
%>
<html>
  <head>
    <title>添加流动站信息</title>
  </head>
  <body>
  <%

    if(Rover.AddRover(Rover.getRovID(),Rover.getAdmID(),Rover.getRovName(),Rover.getComMax())==0)
	{
    
	   out.print("<script>alert('添加流动站失败，请重新尝试  ')</script>");
    }
    else
    {
	   out.print("<script>alert('添加流动站成功')</script>");
	   
    }
    %>
  	 <script type="text/javascript">

        window.location.href="Rover.jsp";    

   </script>
  </body>
</html>
